<?php
/*
 * This file is part of shadon package.
 *
 * (c) shadon.org
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Shadon\CloudPrint\Gateways;

use Shadon\CloudPrint\Configuration\Config;

/**
 * Class Gateway
 */
abstract class Gateway
{
    /**
     * @var \Shadon\CloudPrint\Configuration\Config
     */
    protected $config;

    /**
     * Gateway constructor.
     *
     * @param Config $config
     */
    public function __construct(Config $config)
    {
        $this->config = $config;
    }

    /**
     * 发送打印数据
     * 
     * @param string $category 打印类型 
     *
     * @return boolean
     */
    abstract function sendPrint(string $deviceId, string $category, array $data): array;

    /**
     * 绑定打印机
     *
     * @return boolean
     */
    abstract function bindPrinter(string $deviceId, string $code): array;

    /**
     * 解绑打印机
     *
     * @return boolean
     */
    abstract function unbindPrinter(string $deviceId): array;
}